package com.example.lotterysystem.common.enums;

import lombok.Getter;

@Getter
public enum ActivityPrizeStatusEnum {
    INIT(1, "初始化"),
    COMPLETED(2, "已被抽取");

    private Integer code;
    private String status;

    ActivityPrizeStatusEnum(){

    }
    ActivityPrizeStatusEnum(Integer code, String status){
        this.code = code;
        this.status = status;
    }

    public static ActivityPrizeStatusEnum forName(String name){
        for (ActivityPrizeStatusEnum prizeStatus : ActivityPrizeStatusEnum.values()) {
            if(prizeStatus.name().equalsIgnoreCase(name)){
                return prizeStatus;
            }
        }
        return null;
    }
}
